import javax.swing.ImageIcon;
import javax.swing.JButton;
/**
 * COPYRIGHT(C) 2008. Natasha Khuri. All Rights Reserved.
 * This class defines a button with an image label and a method to
 * change the label
 * @author Natasha Khuri
 * @version 1.01 2008-11-23
 *
 */
public class CardButton extends JButton
{
   /**
    * Constructs a CardButton with an image as its label
    */
   public CardButton()
   {
      card = new ImageIcon(directory + "b1fv.png");
      listener = new CardButtonListener(this);
      this.addActionListener(listener);
      this.setIcon(card);
   }

   /*
    * Chages the image label of this button
    */
   public void change(ImageIcon card)
   {
      this.setIcon(card);
   }

   // instance fields
   public static String directory = "card/";
   private ImageIcon card;
   private CardButtonListener listener;

}
